/**
 * Created by ybjaa on 2017/3/31.
 */
import { NgModule }             from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import {ManageComponent} from "./manage.component";
import {UserAuthService} from "./user-auth.service";
import {MenuManageComponent} from "../menus/menu.component";
import {UploadSingleComponent} from "../upload/upload.component";
import {JSSBDownLoadComponent} from "../file-download/jssb.download.component";
import {AnnouncementComponent} from "../announcement/announcement.component";
import {ResetPasswordCompontent} from "../person/password/persion.reset.password.commponent";
import {ArticleManage} from "../article/article.manage.component";
import {ArticleWrite} from "../article/write/article.write.component";
import {ArticlesList} from "../article/list/article.list.component";

const manageRoutes: Routes = [
    {
        path: "manage",
        component: ManageComponent,
        //canActivate:[UserAuthService]
        children:[
            { path:"menu",component:MenuManageComponent },
            {path:"jssbSingleUpload",component:UploadSingleComponent},
            {path:"jssbDownList",component:JSSBDownLoadComponent},
            {path:"announcement",component:AnnouncementComponent},
            {path:"resetPassword",component:ResetPasswordCompontent},
            {path:"article-manage",component:ArticleManage,
                children:[
                    {path:"write",component:ArticleWrite},
                    {path:"list",component:ArticlesList}
                ]
            }
        ]
    },

];


@NgModule({
    imports: [ RouterModule.forChild(manageRoutes) ],
    exports: [ RouterModule ]

})
export class ManageRoutingModule {}
